var t = require("../../../uv-ui-tools/libs/function/test.js"), e = require("../../../uv-ui-tools/libs/function/index.js"), r = {
    computed: {
        value: function() {
            var r = this.text, s = this.mode, u = this.format;
            this.href;
            return "price" === s ? t.func(u) ? u(r) : e.priceFormat(r, 2) : "date" === s ? (!t.date(r) && e.error(), 
            t.func(u) ? u(r) : u ? e.timeFormat(r, u) : e.timeFormat(r, "yyyy-mm-dd")) : "phone" === s ? t.func(u) ? u(r) : "encrypt" === u ? "".concat(r.substr(0, 3), "****").concat(r.substr(7)) : r : "name" === s ? t.func(u) ? u(r) : "encrypt" === u ? this.formatName(r) : r : r;
        }
    },
    methods: {
        formatName: function(t) {
            var e = "";
            if (2 === t.length) e = t.substr(0, 1) + "*"; else if (t.length > 2) {
                for (var r = "", s = 0, u = t.length - 2; s < u; s++) r += "*";
                e = t.substr(0, 1) + r + t.substr(-1, 1);
            } else e = t;
            return e;
        }
    }
};

exports.value = r;